#include "../inc/stdafx.h"
#include "main.h"
#include <iostream>
#include <mutex>

Gfunc::Gfunc()
{
}

Gfunc::~Gfunc()
{
}

DWORD WINAPI report()
{
	CBoard pb;
	DWORD time_start, time_end;
	int x = 0, y = 0;



	while (true)
	{
		Sleep(10000);
		printf("new class working");
		//time_start = GetTickCount();
		/*
		//pb.SetData(x ,y, 0);
		//pb.SetData(x, y, 1);
		//pb.SetData(x, y, 0);
		//pb.SetData(x, y, 1);
		pb.SetData(x, y, 0);
		*/
		//pb.SetData(x++, y++, 1);
		



		//time_end = GetTickCount();
		//std::cout << "Time = " << (time_end - time_start) << "ms\n "<<std::endl;
	}
	return 0;
}

int Gfunc::main()
{
	int x, y;

	while (true)
	{
		Sleep(1000);
		printf("new class working");
	}
}

int Gfunc::NewThread()
{
	std::thread t(report);
	t.detach();//???
}